<div class="container-fluid">

	<!-- affichage des messages Flash-->
  	<div class="row-fluid">
		<div class="span12">
			<?php echo $this->Session_gpp->flash();?>
		</div>
	</div>

	<!-- Titre de la page-->
	<div class="row-fluid">
		<div class="span12">
			<legend><?php echo __('Importation de tables distantes'); ?></legend>
		</div>
	</div>

	<!-- Barre des boutons-->
	<div class="row-fluid">
		<div class="span12">
			<div class="navbar"/>
				<div class="navbar-inner_gpp">
					<div class="container-fluid">
						<div class="nav-collapse">
							<div class="row-fluid">
								<div class="span2">
									<a href="#" class="btn btn-success btn-small" onclick="document.getElementById('TableImportForm').submit();"><i class="icon-ok icon-white"></i><?php echo __(' Valider')?></a>
			        			</div>
								<div class="span2">	
									<a href="./../../versions/view/<?php echo $saversion['Version']['id'] ; ?>" class="btn btn-inverse btn-small"><i class="icon-remove icon-white"></i><?php echo __(' Annuler')?></a>
						  		</div>
								<div class="span8">	
								</div>
						  	</div>
										
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>

	<!-- div de saisie des informations-->
	<?php echo $this->Form->create('Table');?>
		<div class="row-fluid">
			<div class="span3">
				<div class="input text">
					<fieldset>
						<label for="ChoixImport"><?php echo __('Type importation'); ?></label>
						<input type="radio" name="ChoixImport" value="1" Checked/><?php echo __('Table et Colonnes'); ?>
						<br/>
						<input type="radio" name="ChoixImport" value="2" <?php if($sonapp['Application']['hebergement']!=0) echo 'disabled';?> /><?php echo __('Table, Colonnes et données'); ?>
					</fieldset>
				</div>
			</div>
			<div class="span9">
				<table cellpadding="0" cellspacing="0" border="0" class="table table-striped table-bordered" id="example">
					<thead>
						<tr>
							<th width="1px"><?php echo __('Id'); ?></th>
							<th><?php echo __('Utilisateur/Schema'); ?></th>
							<th><?php echo __('Nom de la Table'); ?></th>
							<th width="1px"></th>
						</tr>
					</thead>
					<tbody>	
						<?php
							if(isset($table_distantes['0'])){
								$i = 0;
								foreach ($table_distantes as $table): ?>
									<tr>
										<td><?php echo ++$i;?></td>
										<td align="left"><?php echo $table['OWNER']; ?>&nbsp;
										</td>
										<td><?php echo $table['TABLE_NAME']; ?></td>
										<td class="center">
											<input type="checkbox" name="Import[]" value="<?php echo $table['TABLE_NAME']; ?>"/> 
										</td>
									</tr>
								<?php endforeach; 
							}
						?>
					</tbody>	
				</table>
			</div>
		</div>
	</form>
</div>
